#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<string>
    using namespace std;
    int main()
    {
        string a1;
        string a2;
        getline(cin, a1);
        getline(cin, a2);
        int i, j = 0;
        for (int i = 0; i < a2.size(); i++)
        {
            int count;
            while ((count = a1.find(a2[i])) != -1)
            {
                a1.erase(count, 1);
            }
        }
        cout << a1 << endl;
        return 0;
    }
